Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Make --norc --noprofile configurable#566

Merged
NickCao merged 4 commits intojumpstarter-dev:mainfrom
vraiti:main
Jul 21, 2025
Merged

Make --norc --noprofile configurable#566
NickCao merged 4 commits intojumpstarter-dev:mainfrom
vraiti:main

Conversation

@vraiti
Copy link
Copy Markdown
Contributor

@vraiti vraiti commented Jul 14, 2025

In reference to jumpstarter-dev/jumpstarter#563

Summary by CodeRabbit

  • New Features
    • Added an option to enable or disable loading of shell profile scripts when launching the shell.
  • Refactor
    • Enhanced shell launch behavior to respect user configuration for profile usage.
    • Updated client configuration to include shell profile usage setting.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 14, 2025

Walkthrough

The changes introduce a new use_profiles boolean parameter to the launch_shell function to control whether bash shells are launched with or without profile scripts. The shell command invocation conditionally includes --norc and --noprofile flags based on this parameter. The ClientConfigV1Alpha1 class gains a shell field of type ShellConfigV1Alpha1 with a use_profiles attribute, and calls to launch_shell are updated accordingly. Tests and client config saving reflect these additions.

Changes

File(s) Change Summary
packages/jumpstarter/jumpstarter/common/utils.py Added use_profiles parameter to launch_shell; conditionally include --norc/--noprofile for bash.
packages/jumpstarter-cli/jumpstarter_cli/shell.py Updated launch_shell calls to pass use_profiles based on config type and attribute.
packages/jumpstarter/jumpstarter/common/utils_test.py Modified tests to explicitly pass use_profiles=False in launch_shell calls.
packages/jumpstarter/jumpstarter/config/shell.py Added ShellConfigV1Alpha1 class with use_profiles: bool = False.
packages/jumpstarter/jumpstarter/config/client.py Added shell: ShellConfigV1Alpha1 = Field(default_factory=ShellConfigV1Alpha1) field to ClientConfigV1Alpha1.
packages/jumpstarter/jumpstarter/config/client_config_test.py Updated tests to include shell config with use_profiles: false in YAML and object instantiations.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ShellCmd
    participant LaunchShell

    User->>ShellCmd: Invoke shell command with config
    ShellCmd->>LaunchShell: Call launch_shell(use_profiles)
    alt use_profiles = True
        LaunchShell->>ShellCmd: Launch bash shell without --norc/--noprofile
    else use_profiles = False
        LaunchShell->>ShellCmd: Launch bash shell with --norc and --noprofile
    end
    ShellCmd-->>User: Shell session started accordingly
Loading

Possibly related PRs

Suggested reviewers

  • mangelajo

Poem

🐇 A shell hops in with options bright,
Profiles on or off in sight.
Flags once fixed now dance with choice,
Giving users a voice.
Bash wakes fresh, with prompt anew,
A cleaner start, thanks to you! 🌿


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e40225b and 1c5e62c.

📒 Files selected for processing (4)
  • packages/jumpstarter-cli/jumpstarter_cli/shell.py (3 hunks)
  • packages/jumpstarter/jumpstarter/config/client.py (2 hunks)
  • packages/jumpstarter/jumpstarter/config/client_config_test.py (4 hunks)
  • packages/jumpstarter/jumpstarter/config/shell.py (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/jumpstarter/jumpstarter/config/shell.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/jumpstarter/jumpstarter/config/client.py
  • packages/jumpstarter-cli/jumpstarter_cli/shell.py
🧰 Additional context used
🧠 Learnings (1)
packages/jumpstarter/jumpstarter/config/client_config_test.py (1)
Learnt from: bennyz
PR: jumpstarter-dev/jumpstarter#241
File: packages/jumpstarter-driver-tftp/jumpstarter_driver_tftp/client.py:52-60
Timestamp: 2025-01-29T11:52:43.554Z
Learning: The TFTP driver (packages/jumpstarter-driver-tftp/jumpstarter_driver_tftp/driver.py) handles all low-level concerns like path validation, error handling, and checksum computation. The client (packages/jumpstarter-driver-tftp/jumpstarter_driver_tftp/client.py) should remain simple as it delegates these responsibilities to the driver.
🧬 Code Graph Analysis (1)
packages/jumpstarter/jumpstarter/config/client_config_test.py (2)
packages/jumpstarter/jumpstarter/config/client.py (2)
  • ClientConfigV1Alpha1 (87-361)
  • ClientConfigV1Alpha1Drivers (65-84)
packages/jumpstarter/jumpstarter/config/shell.py (1)
  • ShellConfigV1Alpha1 (4-5)
🪛 Gitleaks (8.27.2)
packages/jumpstarter/jumpstarter/config/client_config_test.py

222-222: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


261-261: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


296-296: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Redirect rules - jumpstarter-docs
  • GitHub Check: Header rules - jumpstarter-docs
  • GitHub Check: Pages changed - jumpstarter-docs
  • GitHub Check: pytest-matrix (macos-15, 3.13)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.12)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.13)
  • GitHub Check: pytest-matrix (macos-15, 3.11)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.11)
  • GitHub Check: e2e
🔇 Additional comments (6)
packages/jumpstarter/jumpstarter/config/client_config_test.py (6)

11-11: LGTM: Import addition is correctly aligned with test usage.

The addition of ShellConfigV1Alpha1 to the import statement is necessary for the test updates and follows the existing import pattern.


215-216: LGTM: Test updates are consistent with the new shell configuration.

The test correctly adds the shell configuration to both the expected YAML output and the test object instantiation. The default value use_profiles: false is used consistently.

Also applies to: 224-224


254-255: LGTM: Consistent test pattern maintained.

The test updates follow the same pattern as other save tests, properly including the shell configuration in both expected output and test object instantiation.

Also applies to: 263-263


289-290: LGTM: Final save test properly updated.

The test updates maintain consistency with other save tests by including the shell configuration in both expected output and test object instantiation.

Also applies to: 298-298


222-222: Static analysis false positive: These are test fixtures, not actual API keys.

The static analysis tool flagged these as potential API keys, but they are clearly test fixtures used consistently throughout the test suite. The token dGhpc2lzYXRva2VuLTEyMzQxMjM0MTIzNEyMzQtc2Rxd3Jxd2VycXdlcnF3ZXJxd2VyLTEyMzQxMjM0MTIz is a dummy token used for testing purposes and appears in both test objects and expected YAML outputs.

Also applies to: 261-261, 296-296


215-216: Test implementation aligns with current data model.

The test updates correctly reflect the current ShellConfigV1Alpha1 implementation with the use_profiles boolean field. The past review comment about making shell configuration more extensible with a dictionary structure would be addressed in the actual configuration classes rather than in these tests.

Also applies to: 224-224, 254-255, 263-263, 289-290, 298-298

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 14, 2025

Deploy Preview for jumpstarter-docs ready!

Name Link
🔨 Latest commit 1c5e62c
🔍 Latest deploy log https://app.netlify.com/projects/jumpstarter-docs/deploys/687a40a5d7c9440008d32c44
😎 Deploy Preview https://deploy-preview-566--jumpstarter-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/jumpstarter/jumpstarter/common/utils.py (1)

78-83: Consider consistency across shell types.

The bash shell handling now allows user configuration loading while zsh still uses --no-rcs (line 107). Consider whether this inconsistency is intentional or if zsh should also allow user configuration loading for a consistent user experience.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4624f1 and 52a8b00.

📒 Files selected for processing (1)
  • packages/jumpstarter/jumpstarter/common/utils.py (1 hunks)
🔇 Additional comments (1)
packages/jumpstarter/jumpstarter/common/utils.py (1)

82-82: Confirm loading user shell configurations is intended

Our search across .py, .md, and .txt files found no references to --norc or --noprofile. However, removing these flags means users’ .bashrc and profile files will now be sourced, which can alter environment variables, prompt commands, and startup behavior. Please verify that this change aligns with Jumpstarter’s use cases and that no tests or workflows rely on an isolated shell.

• Location to review:

  • packages/jumpstarter/jumpstarter/common/utils.py around line 82 (process = Popen(shell, …))

if shell_name.endswith("bash"):
env = common_env | {
"PS1": f"{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}⚡{ANSI_WHITE}{context} {ANSI_YELLOW}➤{ANSI_RESET} ",
'PROMPT_COMMAND': f'PS1="{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}⚡{ANSI_WHITE}{context} {ANSI_YELLOW}➤{ANSI_RESET} "',
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Jul 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

PROMPT_COMMAND approach looks good, but consider user environment interactions.

The switch from setting PS1 directly to using PROMPT_COMMAND is a good approach as it ensures the prompt is set after the shell initialization. However, consider potential conflicts with user-defined PROMPT_COMMAND functions in their .bashrc.


🏁 Script executed:

#!/bin/bash
# Check if there are any existing PROMPT_COMMAND usage patterns in the codebase
rg -A 3 -B 3 "PROMPT_COMMAND" --type py

Length of output: 715


Preserve existing PROMPT_COMMAND when injecting PS1
Overwriting PROMPT_COMMAND can clobber user-defined hooks in their shell init. Append your prompt assignment to the existing value instead of replacing it.

  • File: packages/jumpstarter/jumpstarter/common/utils.py
    Line: ~80
- 'PROMPT_COMMAND': f'PS1="{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}⚡{ANSI_WHITE}{context} {ANSI_YELLOW}➤{ANSI_RESET} "',
+ 'PROMPT_COMMAND': (
+     f'${{PROMPT_COMMAND:+$PROMPT_COMMAND; }}'
+     f'PS1="{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}⚡{ANSI_WHITE}{context} '
+     f'{ANSI_YELLOW}➤{ANSI_RESET} "'
+ ),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
'PROMPT_COMMAND': f'PS1="{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}{ANSI_WHITE}{context} {ANSI_YELLOW}{ANSI_RESET} "',
'PROMPT_COMMAND': (
f'${{PROMPT_COMMAND:+$PROMPT_COMMAND; }}'
f'PS1="{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}{ANSI_WHITE}{context} {ANSI_YELLOW}{ANSI_RESET} "'
),
🤖 Prompt for AI Agents
In packages/jumpstarter/jumpstarter/common/utils.py at line 80, the current code
overwrites the PROMPT_COMMAND environment variable, which can remove existing
user-defined shell hooks. Modify the assignment to append the new PS1 prompt
command to the existing PROMPT_COMMAND value instead of replacing it, ensuring
any prior commands remain intact by concatenating the new prompt command after
the existing PROMPT_COMMAND string.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vraiti this comment makes sense, I am not 100% sure of the syntax with +$PROMPT_COMMAND but concatenating to existing ones could make sense.

https://unix.stackexchange.com/questions/460651/is-prompt-command-a-colon-separated-list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

}
cmd = [shell, "--norc", "--noprofile"]
process = Popen(cmd, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, env=env)
process = Popen(shell, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, env=env)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
process = Popen(shell, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, env=env)
process = Popen([shell], stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, env=env)

Popen first arg is a list according to docs: https://docs.python.org/3/library/subprocess.html#popen-constructor

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
packages/jumpstarter/jumpstarter/common/utils.py (1)

80-82: Inconsistency with PR title: Still using PS1 instead of PROMPT_COMMAND.

The PR title states "Use PROMPT_COMMAND to set jmp shell prompt" but the implementation still sets PS1 directly. Additionally, a past review comment specifically recommended using PROMPT_COMMAND to preserve existing user-defined PROMPT_COMMAND functions.

Consider implementing the PROMPT_COMMAND approach as suggested in the past review:

-            "PS1": f"{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}⚡{ANSI_WHITE}{context} {ANSI_YELLOW}➤{ANSI_RESET} ",
+            "PROMPT_COMMAND": (
+                f'${{PROMPT_COMMAND:+$PROMPT_COMMAND; }}'
+                f'PS1="{ANSI_GRAY}{PROMPT_CWD} {ANSI_YELLOW}⚡{ANSI_WHITE}{context} '
+                f'{ANSI_YELLOW}➤{ANSI_RESET} "'
+            ),

Likely an incorrect or invalid review comment.

🧹 Nitpick comments (3)
packages/jumpstarter/jumpstarter/common/utils_test.py (2)

8-8: Fix line length violation.

The line exceeds the 120 character limit. Consider reformatting for better readability.

-    exit_code = launch_shell(host=str(tmp_path / "test.sock"), context="remote", allow=["*"], unsafe=False, use_profiles=False)
+    exit_code = launch_shell(
+        host=str(tmp_path / "test.sock"),
+        context="remote",
+        allow=["*"],
+        unsafe=False,
+        use_profiles=False,
+    )

12-12: Fix line length violation.

The line exceeds the 120 character limit. Consider reformatting for better readability.

-    exit_code = launch_shell(host=str(tmp_path / "test.sock"), context="remote", allow=["*"], unsafe=False, use_profiles=False)
+    exit_code = launch_shell(
+        host=str(tmp_path / "test.sock"),
+        context="remote",
+        allow=["*"],
+        unsafe=False,
+        use_profiles=False,
+    )
packages/jumpstarter/jumpstarter/common/utils.py (1)

83-83: Remove whitespace from blank line.

The blank line contains whitespace characters that should be removed.

-        
+
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71d0538 and cdbe077.

📒 Files selected for processing (4)
  • packages/jumpstarter-cli/jumpstarter_cli/shell.py (3 hunks)
  • packages/jumpstarter/jumpstarter/common/utils.py (2 hunks)
  • packages/jumpstarter/jumpstarter/common/utils_test.py (1 hunks)
  • packages/jumpstarter/jumpstarter/config/client.py (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/jumpstarter/jumpstarter/config/client.py
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/jumpstarter/jumpstarter/common/utils.py (1)
packages/jumpstarter-cli/jumpstarter_cli/shell.py (1)
  • shell (26-79)
🪛 GitHub Check: ruff
packages/jumpstarter/jumpstarter/common/utils_test.py

[failure] 12-12: Ruff (E501)
packages/jumpstarter/jumpstarter/common/utils_test.py:12:121: E501 Line too long (127 > 120)


[failure] 8-8: Ruff (E501)
packages/jumpstarter/jumpstarter/common/utils_test.py:8:121: E501 Line too long (127 > 120)

packages/jumpstarter/jumpstarter/common/utils.py

[failure] 83-83: Ruff (W293)
packages/jumpstarter/jumpstarter/common/utils.py:83:1: W293 Blank line contains whitespace

🪛 GitHub Actions: Lint
packages/jumpstarter/jumpstarter/common/utils.py

[warning] 83-83: Ruff: W293 Blank line contains whitespace

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Redirect rules - jumpstarter-docs
  • GitHub Check: Header rules - jumpstarter-docs
  • GitHub Check: Pages changed - jumpstarter-docs
  • GitHub Check: e2e
🔇 Additional comments (5)
packages/jumpstarter/jumpstarter/common/utils_test.py (1)

8-13: Test updates align correctly with the new function signature.

The addition of use_profiles=False parameter to both test calls is consistent with the updated launch_shell function signature.

packages/jumpstarter/jumpstarter/common/utils.py (2)

54-54: New parameter correctly implements profile control.

The addition of the use_profiles parameter provides the necessary control for bash shell profile loading behavior.


84-86: Profile control logic is correctly implemented.

The conditional logic properly handles the --norc and --noprofile flags based on the use_profiles parameter.

packages/jumpstarter-cli/jumpstarter_cli/shell.py (2)

54-54: Correct integration of profile configuration for client config.

The changes properly pass config.shell_use_profiles for ClientConfigV1Alpha1 configurations, allowing users to control profile loading behavior.

Also applies to: 63-63


77-77: Appropriate default for exporter config.

Setting use_profiles=False for ExporterConfigV1Alpha1 is logical since exporter environments are typically more controlled and don't need user profile customizations.

@vraiti vraiti changed the title Use PROMPT_COMMAND to set jmp shell prompt Make --norc --noprofile configurable Jul 16, 2025
@vraiti
Copy link
Copy Markdown
Contributor Author

vraiti commented Jul 16, 2025

So turns out trying to set PROMPT_COMMAND leads to a whole host of issues since VTE will clobber it in /etc/profile.d/vte.sh. Instead I tried adding a user configuration shell_use_profiles (that is by default disabled). Lmk if this is ok.

@vraiti
Copy link
Copy Markdown
Contributor Author

vraiti commented Jul 16, 2025

@mangelajo

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/jumpstarter/jumpstarter/config/client_config_test.py (1)

223-224: Explicitly passing shell_use_profiles=False is redundant but harmless

Since the field already defaults to False, omitting the kwarg would keep the constructor calls shorter. If explicitness aids readability for your team, no action needed—just stay consistent across tests.

Also applies to: 261-262, 295-296

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c837339 and e40225b.

📒 Files selected for processing (5)
  • packages/jumpstarter-cli/jumpstarter_cli/shell.py (3 hunks)
  • packages/jumpstarter/jumpstarter/common/utils.py (2 hunks)
  • packages/jumpstarter/jumpstarter/common/utils_test.py (1 hunks)
  • packages/jumpstarter/jumpstarter/config/client.py (1 hunks)
  • packages/jumpstarter/jumpstarter/config/client_config_test.py (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/jumpstarter/jumpstarter/config/client.py
  • packages/jumpstarter/jumpstarter/common/utils_test.py
  • packages/jumpstarter/jumpstarter/common/utils.py
  • packages/jumpstarter-cli/jumpstarter_cli/shell.py
🧰 Additional context used
🧠 Learnings (1)
packages/jumpstarter/jumpstarter/config/client_config_test.py (1)
Learnt from: bennyz
PR: jumpstarter-dev/jumpstarter#241
File: packages/jumpstarter-driver-tftp/jumpstarter_driver_tftp/client.py:52-60
Timestamp: 2025-01-29T11:52:43.554Z
Learning: The TFTP driver (packages/jumpstarter-driver-tftp/jumpstarter_driver_tftp/driver.py) handles all low-level concerns like path validation, error handling, and checksum computation. The client (packages/jumpstarter-driver-tftp/jumpstarter_driver_tftp/client.py) should remain simple as it delegates these responsibilities to the driver.
🧬 Code Graph Analysis (1)
packages/jumpstarter/jumpstarter/config/client_config_test.py (1)
packages/jumpstarter/jumpstarter/config/client.py (2)
  • ClientConfigV1Alpha1 (86-360)
  • ClientConfigV1Alpha1Drivers (64-83)
🪛 Gitleaks (8.27.2)
packages/jumpstarter/jumpstarter/config/client_config_test.py

221-221: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


259-259: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


293-293: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Redirect rules - jumpstarter-docs
  • GitHub Check: Header rules - jumpstarter-docs
  • GitHub Check: Pages changed - jumpstarter-docs
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.11)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.13)
  • GitHub Check: pytest-matrix (macos-15, 3.12)
  • GitHub Check: pytest-matrix (ubuntu-24.04, 3.12)
  • GitHub Check: pytest-matrix (macos-15, 3.11)
  • GitHub Check: pytest-matrix (macos-15, 3.13)
  • GitHub Check: e2e
🔇 Additional comments (1)
packages/jumpstarter/jumpstarter/config/client_config_test.py (1)

215-215: YAML expectations updated for new field – looks correct

Adding shell_use_profiles: false to the golden YAML strings fully exercises the newly introduced field and will catch regressions if the default ever flips. Indentation and key order match the serializer’s output, so the equality checks should remain stable.

Also applies to: 253-253, 287-287

Copy link
Copy Markdown
Member

@mangelajo mangelajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small tweak, and I think it will be a very nice addition, thanks @vraiti

- jumpstarter.drivers.*
- vendorpackage.*
unsafe: false
shell_use_profiles: false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
shell_use_profiles: false
shell:
use_profiles: false

I think it's a cool idea, in fact I propose that we make it a bit more future-proof an extensible by adding a whole dictionary to let users configure shell with more detail. May be in the future people want to extend by selecting a particular shell binary, or other things (not for this patch), but let's leave the structure in place.

@vraiti
Copy link
Copy Markdown
Contributor Author

vraiti commented Jul 18, 2025

@mangelajo

@mangelajo mangelajo self-requested a review July 21, 2025 14:50
Copy link
Copy Markdown
Member

@mangelajo mangelajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! :) @NickCao ^

Copy link
Copy Markdown
Collaborator

@NickCao NickCao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, but are the '--norc','--noprofile' portable across shells?

@NickCao NickCao merged commit 8b15279 into jumpstarter-dev:main Jul 21, 2025
18 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants